Conversation
…oken handling and refresh logic
…ndling; improve error handling and response management
larryrider
reviewed
Dec 5, 2025
backend/internxt/auth.go
Outdated
| info.RootFolderID = resp.User.RootFolderID | ||
| fs.Debugf(nil, "Using RootFolderID from refresh response: %s", info.RootFolderID) | ||
| } else if resp.User.UUID != "" { | ||
| info.RootFolderID = resp.User.UUID |
There was a problem hiding this comment.
Is this right? I think that the user.uuid cannot be used as the rootFolderId 🤔
Collaborator
Author
There was a problem hiding this comment.
yeah, that made no sense I must have been trying to get this from somewhere else as a sort of fallback. but I just streamlined this code since we call refresh anyway just like cli does there is no point in attempting to get this info from somewhere else. We now just get it from the refresh response
| return | ||
| } | ||
|
|
||
| mnemonicBytes, err := base64.StdEncoding.DecodeString(mnemonicB64) |
There was a problem hiding this comment.
maybe it could be a good idea to check also if the mnemonic is valid, i dont know about golang dependencies but i think it should exist at least one haha
Collaborator
Author
There was a problem hiding this comment.
sounds good, added an explicit mnemonic check now
…etrieval from the refresh endpoint
…c validation and improved error redirection
larryrider
approved these changes
Dec 15, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implement auth flow, following the Box backend.
SSO Authentication Flow:
Automatic Token Refresh (Box Backend Pattern)
Follows Box backend JWT implementation (backend/box/box.go) for: